<template>
  <div>
    <h1>学习$attrs与$listeners</h1>

    <hr />
    <el-button
      type="primary"
      size="small"
      :icon="Edit"
      @click="handler"
    ></el-button>
    <h1 v-bind="{ a: 1, b: 2 }">123</h1>
    <HintButton
      type="primary"
      size="small"
      :icon="Edit"
      title="编辑按钮"
      @click="handler"
    ></HintButton>
  </div>
</template>

<script setup lang="ts">
//vue3框架提供一个方法useAttrs方法它可以获取组件身上的属性与事件！！！
//图标组件
import {
  Check,
  Delete,
  Edit,
  Message,
  Search,
  Star,
} from "@element-plus/icons-vue";

//引入自己封装按钮
import HintButton from "./HintButton.vue";

const handler = function () {
  alert("11");
};
</script>

<style scoped></style>
